package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("document")
public class Document {
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    @Schema(description = "归属用户id")
    private Long userId;

    @Schema(description = "所属知识库id")
    private Long baseId;

    @Schema(description = "对象存储的url")
    private String url;

    @Schema(description = "文档标题")
    private String title;

    @Schema(description = "文档是否经过嵌入处理,0代表未嵌入，1代表已经嵌入")
    private Integer isEmbedding;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;
}
